Skip to content

Conversation

@daviwil
Copy link
Contributor

@daviwil daviwil commented May 7, 2017

This change adds a new script that can be used to install Visual Studio
Code and the PowerShell extension. The intent is for this script to be
shipped to the PowerShell Gallery so that one can easily get the script
and install VS Code in a single line of PowerShell.

@daviwil
Copy link
Contributor Author

daviwil commented May 7, 2017

Would definitely appreciate some feedback on the quality of this script!

@dfinke
Copy link
Contributor

dfinke commented May 7, 2017

Uninstalled both the current and insiders vs code versions. Ran the script, worked like a charm. I'll try again and make sure the PSES ext is not installed too.

image

#>
[CmdletBinding()]
param(
[Parameter(Mandatory=$false)]
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I usually don't bother specifying Mandatory=$false since that is the default. Other than that LGTM.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ahhh yep, thanks!

This change adds a new script that can be used to install Visual Studio
Code and the PowerShell extension.  The intent is for this script to be
shipped to the PowerShell Gallery so that one can easily get the script
and install VS Code in a single line of PowerShell.
@daviwil
Copy link
Contributor Author

daviwil commented May 7, 2017

Thanks guys!

@daviwil daviwil merged commit fc2ea7b into PowerShell:develop May 7, 2017
@daviwil daviwil deleted the install-script branch May 7, 2017 20:33
@adamrushuk
Copy link

Although this worked initially, I tried uninstalling the PowerShell Extension before uninstalling VSCode, and this time got this error which left VSCode installed without the PowerShell Extension:
image

@daviwil
Copy link
Contributor Author

daviwil commented May 8, 2017

Argh, yeah, VS Code has this weird thing where they need to update their internal extension metadata by restarting the editor. If you uninstall the extension and close the editor then try to reinstall the extension via command line, VS Code throws up. Not sure if there's a way around that yet, but I'll see what I can figure out.

Thanks for letting me know!

@adamrushuk
Copy link

Ah that was my bad then as I didn't restart code before uninstalling during the test.
It worked as expected once I did the above, but struggled to delete the previously downloaded "vscode-stable.exe" file in $env:TEMP. That looks like a known issue though, so I manually deleted before the successful test shown below:

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants